feat(builtins): support -d @- and -d @file in curl builtin#929
Merged
Conversation
Read request body from stdin (-d @-) or VFS file (-d @/path) instead of treating the @ prefix as a literal string. Matches real curl behavior. Closes #928
Add tests for -d @- with no stdin and -d with plain data (no @ prefix). Assert exit code 26 for missing file. Update 005-builtins spec to document @-/@ file support for -d option.
Bump exemption versions in supply-chain/config.toml for 25 transitive dependencies (icu_*, wasm-bindgen*, libc, js-sys, web-sys, zerovec*, yoke*, zerofrom*, etc.) and remove stale entries for crates now covered by imported audits.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
-d @-(read request body from stdin) and-d @/path/to/file(read from VFS file) in the curl builtin, matching real curl behaviorspecs/005-builtins.mdto document the new-d @supportTests added
test_curl_data_at_stdin—-d @-reads from stdintest_curl_data_at_file—-d @/pathreads from VFS filetest_curl_data_at_file_not_found— missing file returns exit code 26test_curl_data_at_stdin_none—-d @-with no stdin resolves to empty stringtest_curl_data_literal_no_at— plain-d valuestill works unchangedTest plan
cargo test --all-features— 2150+ tests passcargo fmt --check— cleancargo clippy --all-targets --all-features -- -D warnings— cleanCloses #928